#ifndef RES_LR1
#define RES_LR1

namespace res1
{
 struct ochered
  {
	char inf;
	ochered *nxt;
  };
 
 //dobavlenie
 void push (ochered ** b, char inf)
 {
     ochered* newel;
     ochered* cur, * prev;
     
    prev = 0;
 	newel = new ochered;
 	newel -> inf = inf;
 	newel -> nxt = 0;
 	cur = *b;

 	while (cur != 0)
 	{
 		prev = cur;
 		cur = cur->nxt;
 	}
 	if (prev != 0)
 		prev -> nxt = newel;
 	else
 		*b = newel;	
 };

 //chtenie udalenie 
char pop (ochered** b)
 {
 	ochered* tmp;
 	char inf;
 	inf = '\0';
 	
 	if (*b != 0)
 	{
 		tmp = *b;
 		*b = (*b) -> nxt;
 		inf = tmp->inf;
 		delete tmp;
 		
 		return inf;
 	}
 	  else return inf;
 };
 
}

#endif 
